From 19da41b9f8c7b25cd226804c21564e0e8ac8cc88 Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Sun, 20 Sep 2026 13:47:08 +0200 Subject: [PATCH] CVE-2023-51792: check validity of conformance window parameters Origin: https://github.com/strukturag/libde265/commit/221e767136b8c46c748ae35b79ec9b976b3da301 Imported from 1.0.11-0+deb11u4 (cherry picked from commit 221e767136b8c46c748ae35b79ec9b976b3da301) Gbp-Pq: Name CVE-2023-51792.patch --- libde265/image.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libde265/image.cc b/libde265/image.cc index 39813b0..057705c 100644 --- a/libde265/image.cc +++ b/libde265/image.cc @@ -330,6 +330,14 @@ de265_error de265_image::alloc_image(int w,int h, enum de265_chroma c, int top = sps ? sps->conf_win_top_offset : 0; int bottom = sps ? sps->conf_win_bottom_offset : 0; + if ((left+right)*WinUnitX >= width) { + return DE265_ERROR_CODED_PARAMETER_OUT_OF_RANGE; + } + + if ((top+bottom)*WinUnitX >= height) { + return DE265_ERROR_CODED_PARAMETER_OUT_OF_RANGE; + } + width_confwin = width - (left+right)*WinUnitX; height_confwin= height- (top+bottom)*WinUnitY; chroma_width_confwin = chroma_width -left-right; -- 2.39.5